using System;
using System.ComponentModel;
using System.ComponentModel.Composition;
using System.Windows;
using System.Windows.Controls;
using Cinch;
using SLS.Base;
using SLS.Controls;
using SLS.Document;
using SLS.ExClassLib.Data;
using SLS.ExClassLib.Events;
using SLS.ExClassLib.Loc;
using SLS.ExClassLib.Message;
using SLS.ExClassLib.MVVM;
using SLS.ExClassLib.WFActivities;
namespace LanSunStudio.GUI
{
    /// <summary>
    ////* 2012/10/5 5:26:45*/ 
    /// Interaction logic for EditSystemManagement.xaml
    /// </summary>
     [ViewnameToViewLookupKeyMetadata("DATASystemManagement", typeof(DATASystemManagement))]
    public partial class DATASystemManagement : ExDATA
    {  
        [Import("SystemManagementLocalizationModel", typeof(ILocalizationModel))]
        public override ILocalizationModel LocalizationModel
        {
            get { return base.LocalizationModel; }
            set { base.LocalizationModel = value; }
        }    
        public DATASystemManagement()
        {
            InitializeComponent(); 
            if (DesignerProperties.GetIsInDesignMode(this as DependencyObject))
              {
                  return;
              }
            Address = " DATASystemManagement" + "#" + Guid.NewGuid().ToString().ToUpper();              
            BaseTable ="SystemManagement";  
            KSYSID.Text="1";
            KGOODSTYPEKEY.Text="SS";
            KGOODSTYPEKEYDEFKEY.Text="100038";
            KKEYINSTANCETABLE.Text="SystemManagement";
            KPOSITIONID.Text="1"; 
        } 
        public override void DATAPopUpMenu_Loaded(object sender, RoutedEventArgs e)
        {
            base.DATAPopUpMenu_Loaded(sender, e);
            PopUpMenuTextBox pop = sender as PopUpMenuTextBox;
            
            pop.DataContext = ((VIPSystemManagementViewModel)this.DataContext).M10003801;
        }        
        public override void ExUserControl_Loaded(object sender, RoutedEventArgs e)
        {
            base.ExUserControl_Loaded(sender, e);
            try
            {
                if (NMICD != null)
                {
                    NMICD.CMDEXE.TextChanged += new TextChangedEventHandler(CMDEXE_TextChanged);
                } 
            }
            catch (Exception ex)
            {
                Tracer.Error(ex.StackTrace, ex);
            }
        }
    }
} 
 
